import { request } from '@/utils/request';

export function datasourceList() {
  return request.get({ url: '/upms/ds/list' });
}

export function addDs(data: any) {
  return request.post({ url: '/upms/ds', data });
}

export function updateDs(data: any) {
  return request.put({ url: '/upms/ds', data });
}

export function deleteDs(id: string) {
  return request.delete({ url: `/upms/ds/${id}` });
}

export function tableList(params: any) {
  return request.get({ url: '/upms/gen/list', params });
}

export function genView(data: any) {
  return request.post({ url: '/upms/gen/view', data });
}
